<h1><%= title "Editing #{@trait.name}" %></h1>

<% form_for(@trait) do |f| %>
  <%= f.error_messages %>

  <p>
		<%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  <p>
		<%= f.label :category %><br />
    	<select name="trait[category]">
			<%=options_trait_categories @trait.category %>
		</select>
  </p>
  <p>
		<%= f.label :description %><br />
    <%= f.text_area :description %>
  </p>
  <p>
		<%= f.label :icon %><br />
    <%= f.text_field :icon %>
  </p>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', @trait %> |
<%= link_to 'Back', traits_path %>